
<!DOCTYPE HTML>
<html lang="" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>安装部署sosotest服务 · sosotest</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        
        
        
    
    <link rel="stylesheet" href="../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-expandable-chapters/expandable-chapters.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-splitter/splitter.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-search/search.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-theme-comscore/test.css">
                
            
        

    

    
        
    
        
    
        
    
        
    
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="./" />
    
    
    <link rel="prev" href="../" />
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="Type to search" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    

    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="../">
            
                <a href="../">
            
                    
                    sosotest平台介绍
            
                </a>
            

            
        </li>
    
        <li class="chapter active" data-level="1.2" data-path="A00_install.html">
            
                <a href="A00_install.html">
            
                    
                    安装部署sosotest服务
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="./">
            
                <a href="./">
            
                    
                    使用配置入门
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.1" data-path="A01_system_config.html">
            
                <a href="A01_system_config.html">
            
                    
                    管理员配置
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.2" data-path="A02_user_config.html">
            
                <a href="A02_user_config.html">
            
                    
                    用户配置
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.3" data-path="A03_interface.html">
            
                <a href="A03_interface.html">
            
                    
                    用例编写
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.4" data-path="A04_task.html">
            
                <a href="A04_task.html">
            
                    
                    任务与任务集
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.5" data-path="A05_cicd.html">
            
                <a href="A05_cicd.html">
            
                    
                    持续集成
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4" data-path="../A0001_admin/">
            
                <a href="../A0001_admin/">
            
                    
                    后台管理部分
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.1" data-path="../A0001_admin/A01_login.html">
            
                <a href="../A0001_admin/A01_login.html">
            
                    
                    管理员登录
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.2" data-path="../A0001_admin/A02_user_group_manage.html">
            
                <a href="../A0001_admin/A02_user_group_manage.html">
            
                    
                    用户小组管理
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.3" data-path="../A0001_admin/A03_permission.html">
            
                <a href="../A0001_admin/A03_permission.html">
            
                    
                    权限管理
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.4" data-path="../A0001_admin/A04_admin.html">
            
                <a href="../A0001_admin/A04_admin.html">
            
                    
                    管理员管理
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.5" data-path="../A0001_admin/A05_config.html">
            
                <a href="../A0001_admin/A05_config.html">
            
                    
                    平台配置管理
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5" data-path="../A0002_user/">
            
                <a href="../A0002_user/">
            
                    
                    用户使用
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.1" data-path="../A0002_user/A01_config.html">
            
                <a href="../A0002_user/A01_config.html">
            
                    
                    配置管理
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.2" data-path="../A0002_user/A02_http.html">
            
                <a href="../A0002_user/A02_http.html">
            
                    
                    HTTP接口测试
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.3" data-path="../A0002_user/A03_dubbo.html">
            
                <a href="../A0002_user/A03_dubbo.html">
            
                    
                    DUBBO接口测试
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.4" data-path="../A0002_user/A04_globalvar.html">
            
                <a href="../A0002_user/A04_globalvar.html">
            
                    
                    全局变量
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.5" data-path="../A0002_user/A05_text.html">
            
                <a href="../A0002_user/A05_text.html">
            
                    
                    组合文本
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6" data-path="../A0003_mock/">
            
                <a href="../A0003_mock/">
            
                    
                    MOCK服务
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.1" data-path="../A0003_mock/A02_createmock.html">
            
                <a href="../A0003_mock/A02_createmock.html">
            
                    
                    新建mock
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.2" data-path="../A0003_mock/A03_requestmock.html">
            
                <a href="../A0003_mock/A03_requestmock.html">
            
                    
                    请求mock
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.3" data-path="../A0003_mock/A04_recodermock.html">
            
                <a href="../A0003_mock/A04_recodermock.html">
            
                    
                    mock录制
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.7" data-path="../A0004_keyword/">
            
                <a href="../A0004_keyword/">
            
                    
                    关键字模式介绍
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.7.1" data-path="../A0004_keyword/A01_use.html">
            
                <a href="../A0004_keyword/A01_use.html">
            
                    
                    使用关键字
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.2" data-path="../A0004_keyword/A02_buildin.html">
            
                <a href="../A0004_keyword/A02_buildin.html">
            
                    
                    内置关键字介绍
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.3" data-path="../A0004_keyword/A03_selfdefine.html">
            
                <a href="../A0004_keyword/A03_selfdefine.html">
            
                    
                    自定义关键字
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.8" data-path="../A0005_pythonmode/">
            
                <a href="../A0005_pythonmode/">
            
                    
                    python模式介绍
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.8.1" data-path="../A0005_pythonmode/A01_use.html">
            
                <a href="../A0005_pythonmode/A01_use.html">
            
                    
                    使用python模式
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.2" data-path="../A0005_pythonmode/A02_buildin.html">
            
                <a href="../A0005_pythonmode/A02_buildin.html">
            
                    
                    内置python函数介绍
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.3" data-path="../A0005_pythonmode/A03_selfdefine.html">
            
                <a href="../A0005_pythonmode/A03_selfdefine.html">
            
                    
                    自定义python
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.4" data-path="../A0005_pythonmode/A04_ddt.html">
            
                <a href="../A0005_pythonmode/A04_ddt.html">
            
                    
                    数据驱动DDT
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.9" data-path="../A0010_context/">
            
                <a href="../A0010_context/">
            
                    
                    context上下文对象
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.9.1" data-path="../A0010_context/A01_vars.html">
            
                <a href="../A0010_context/A01_vars.html">
            
                    
                    常用变量
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.9.2" data-path="../A0010_context/A02_functions.html">
            
                <a href="../A0010_context/A02_functions.html">
            
                    
                    常用函数
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.10" data-path="../A0009_data/">
            
                <a href="../A0009_data/">
            
                    
                    数据操作
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.10.1" data-path="../A0009_data/A01_mysqldb.html">
            
                <a href="../A0009_data/A01_mysqldb.html">
            
                    
                    mysql数据库操作
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10.2" data-path="../A0009_data/A02_redis.html">
            
                <a href="../A0009_data/A02_redis.html">
            
                    
                    redis缓存操作
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10.3" data-path="../A0009_data/A03_mongo.html">
            
                <a href="../A0009_data/A03_mongo.html">
            
                    
                    mongo数据库操作
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.11" data-path="../A0006_ci/">
            
                <a href="../A0006_ci/">
            
                    
                    持续集成
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.11.1" data-path="../A0006_ci/A01_invoke.html">
            
                <a href="../A0006_ci/A01_invoke.html">
            
                    
                    invoke接口介绍
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.11.2" data-path="../A0006_ci/A02_cishell.html">
            
                <a href="../A0006_ci/A02_cishell.html">
            
                    
                    CI shell 脚本说明
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.12" data-path="../A0007_assert/">
            
                <a href="../A0007_assert/">
            
                    
                    断言处理
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.12.1" data-path="../A0007_assert/A01_contains.html">
            
                <a href="../A0007_assert/A01_contains.html">
            
                    
                    包含断言
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.12.2" data-path="../A0007_assert/A02_recurjson.html">
            
                <a href="../A0007_assert/A02_recurjson.html">
            
                    
                    递归JSON断言
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.12.3" data-path="../A0007_assert/A03_conditionbool.html">
            
                <a href="../A0007_assert/A03_conditionbool.html">
            
                    
                    条件断言
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.12.4" data-path="../A0007_assert/A04_assertstruct.html">
            
                <a href="../A0007_assert/A04_assertstruct.html">
            
                    
                    结构断言
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.13" data-path="../A0008_errors/">
            
                <a href="../A0008_errors/">
            
                    
                    常见错误原因
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.13.1" data-path="../A0008_errors/A03_other.html">
            
                <a href="../A0008_errors/A03_other.html">
            
                    
                    莫名其妙的错误
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            Published with GitBook
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href=".." >安装部署sosotest服务</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <h1 id="&#x5B89;&#x88C5;&#x90E8;&#x7F72;sosotest&#x670D;&#x52A1;">&#x5B89;&#x88C5;&#x90E8;&#x7F72;sosotest&#x670D;&#x52A1;</h1>
<p>&#x90E8;&#x7F72;&#x73AF;&#x5883;&#x652F;&#x6301;linux&#x3001;windows&#x3001;mac&#x7B49;</p>
<h3 id="&#x63A8;&#x8350;&#x4F7F;&#x7528;linux&#x7CFB;&#x7EDF;&#x90E8;&#x7F72;">*&#x63A8;&#x8350;&#x4F7F;&#x7528;linux&#x7CFB;&#x7EDF;&#x90E8;&#x7F72;</h3>
<h1 id="1&#x3001;&#x4E0B;&#x8F7D;sosotest&#x4EE3;&#x7801;">1&#x3001;&#x4E0B;&#x8F7D;sosotest&#x4EE3;&#x7801;</h1>
<h1 id="2&#x3001;&#x5B89;&#x88C5;mysql-57">2&#x3001;&#x5B89;&#x88C5;mysql 5.7</h1>
<p>&#x63A8;&#x8350;&#x7248;&#x672C;&#xFF1A; mysql  Ver 14.14 Distrib 5.7.22</p>
<h1 id="3&#x3001;&#x5B89;&#x88C5;redis">3&#x3001;&#x5B89;&#x88C5;redis</h1>
<p>&#x63A8;&#x8350;&#x7248;&#x672C;&#xFF1A;Redis server v=4.0.2</p>
<h1 id="4&#x3001;&#x521B;&#x5EFA;mysql&#x6570;&#x636E;&#x5E93;">4&#x3001;&#x521B;&#x5EFA;mysql&#x6570;&#x636E;&#x5E93;</h1>
<p>&#x521B;&#x5EFA;&#x6570;&#x636E;&#x5E93; sosotest_data(&#x540D;&#x79F0;&#x4E0E;&#x914D;&#x7F6E;&#x6587;&#x4EF6;config.ini&#x4E00;&#x81F4;&#x5373;&#x53EF;)
&#x4F7F;&#x7528;&#x5B57;&#x7B26;&#x96C6;utf8mb4&#xFF0C;&#x547D;&#x4EE4;&#xFF1A;</p>
<pre><code class="lang-sql"><span class="hljs-keyword">CREATE</span> <span class="hljs-keyword">DATABASE</span> sosotest_data <span class="hljs-keyword">DEFAULT</span> <span class="hljs-built_in">CHARACTER</span> <span class="hljs-keyword">SET</span> utf8mb4 <span class="hljs-keyword">collate</span> utf8mb4_unicode_ci;
</code></pre>
<h1 id="5&#x3001;&#x5B89;&#x88C5;python">5&#x3001;&#x5B89;&#x88C5;python</h1>
<p>&#x63A8;&#x8350;&#x7248;&#x672C;&#xFF1A;3.6.5 
<a href="https://www.python.org/downloads/release/python-365/" target="_blank">https://www.python.org/downloads/release/python-365/</a></p>
<h1 id="6&#x3001;&#x5B89;&#x88C5;python&#x76F8;&#x5173;&#x4F9D;&#x8D56;&#x3002;">6&#x3001;&#x5B89;&#x88C5;python&#x76F8;&#x5173;&#x4F9D;&#x8D56;&#x3002;</h1>
<p>&#x7531;&#x4E8E;&#x5D4C;&#x5165;&#x4E86;ldap&#x7684;&#x4F9D;&#x8D56;&#xFF0C;&#x9700;&#x8981;&#x6309;&#x7167;&#x8BF4;&#x660E;&#x5B89;&#x88C5;ldap&#x76F8;&#x5173;&#x3002;<br>
LDAP&#x76F8;&#x5173;&#x4F9D;&#x8D56;&#x5B89;&#x88C5;<br>
windows: <a href="https://www.lfd.uci.edu/~gohlke/pythonlibs/#python-ldap" target="_blank">https://www.lfd.uci.edu/~gohlke/pythonlibs/#python-ldap</a>  <br>
install the .whl file<br></p>
<pre><code class="lang-bash">pip3 install python_ldap-3.1.0-cp36-cp36m-win_amd64.whl
</code></pre>
<p>linux:   yum install openldap-devel python-devel<br></p>
<p>Windows&#x4E0B;&#x542F;&#x52A8;master(main.py)&#x548C;slave(run.py)&#x7684;&#x8BDD;&#xFF0C;&#x8FD8;&#x9700;&#x8981;&#x5B89;&#x88C5;pywin32&#xFF1A;<br></p>
<pre><code class="lang-bash">pip3 install pywin32==224
</code></pre>
<p>&#x6700;&#x540E;&#xFF0C;&#x5B89;&#x88C5;&#x76F8;&#x5173;&#x4F9D;&#x8D56;&#x7684;requirement&#x6587;&#x4EF6;&#xFF0C;&#x5728;install/require.txt&#x4E2D;&#xFF0C;&#x5B89;&#x88C5;&#x547D;&#x4EE4;&#xFF1A;<br></p>
<pre><code class="lang-bash">pip3 install -r require.txt
</code></pre>
<h1 id="7&#x3001;&#x4FEE;&#x6539;&#x914D;&#x7F6E;&#x6587;&#x4EF6;">7&#x3001;&#x4FEE;&#x6539;&#x914D;&#x7F6E;&#x6587;&#x4EF6;</h1>
<p>&#x914D;&#x7F6E;&#x6839;&#x76EE;&#x5F55;&#x76EE;&#x5F55;&#x4E0B;&#x7684;config.ini&#xFF0C;&#x5177;&#x4F53;&#x914D;&#x7F6E;&#x53C2;&#x8003;config.ini&#x4E2D;&#x7684;&#x6CE8;&#x91CA;&#x8BF4;&#x660E;&#x3002;<br></p>
<h1 id="8&#x3001;&#x521D;&#x59CB;&#x5316;&#x6570;&#x636E;&#x5E93;&#x8868;&#x7ED3;&#x6784;">8&#x3001;&#x521D;&#x59CB;&#x5316;&#x6570;&#x636E;&#x5E93;&#x8868;&#x7ED3;&#x6784;</h1>
<p>&#x8FDB;&#x5165;AutotestWebD&#x76EE;&#x5F55;&#xFF0C;&#x6267;&#x884C;<br></p>
<pre><code class="lang-bash">python3 manage.py migrate
</code></pre>
<h1 id="9&#x3001;&#x521D;&#x59CB;&#x5316;&#x6570;&#x636E;&#x5E93;&#x6570;&#x636E;">9&#x3001;&#x521D;&#x59CB;&#x5316;&#x6570;&#x636E;&#x5E93;&#x6570;&#x636E;</h1>
<p>&#x8FDB;&#x5165;AutotestWebD/apps/scripts/initial&#x76EE;&#x5F55;&#xFF0C;&#x6267;&#x884C; <br></p>
<pre><code class="lang-bash">python3 A0000_init_myadmin_account.py
python3 A0000_init_myadmin_add_adminManagePermissionData.py
python3 A0000_init_tb_<span class="hljs-built_in">exec</span>_python_attrs.py
python3 A0000_init_sources.py
python3 A0001_init_permission_data.py
</code></pre>
<h1 id="10&#x3001;&#x542F;&#x52A8;&#x76F8;&#x5173;&#x5DE5;&#x7A0B;">10&#x3001;&#x542F;&#x52A8;&#x76F8;&#x5173;&#x5DE5;&#x7A0B;</h1>
<p>&#x542F;&#x52A8;&#x8BF4;&#x660E;&#xFF1A;<br>
1&#x3001;&#x542F;&#x52A8;web&#x670D;&#x52A1;(django)&#x3002;<br></p>
<pre><code class="lang-bash">python3 AutotestWebD/manage.py runserver 0.0.0.0:8000
</code></pre>
<p>2&#x3001;&#x542F;&#x52A8;master&#x670D;&#x52A1;(main.py)<br></p>
<pre><code class="lang-bash">python3 AutotestFramework/<span class="hljs-built_in">test</span>_run/main.py
</code></pre>
<p>3&#x3001;&#x542F;&#x52A8;slave&#x670D;&#x52A1;(run.py)<br></p>
<pre><code class="lang-bash">python3 AutotestFramework/<span class="hljs-built_in">test</span>_run/run.py
</code></pre>
<p>*&#x6CE8;&#xFF1A;bin&#x76EE;&#x5F55;&#x4E0B;&#x6709;&#x5BF9;&#x5E94;&#x7684;&#x542F;&#x52A8;&#x811A;&#x672C;&#xFF0C;&#x914D;&#x7F6E;bin.ini&#xFF0C;windows&#x4E0B;&#x914D;&#x7F6E;windows.ini&#xFF0C;&#x7136;&#x540E;&#x9009;&#x62E9;&#x5BF9;&#x5E94;&#x7684;&#x811A;&#x672C;&#x542F;&#x52A8;&#x5373;&#x53EF;&#x3002;</p>
<p>4&#x3001;&#x5C06;Chrome&#x6269;&#x5C55;&#x653E;&#x5165;&#x4E0B;&#x8F7D;&#x76EE;&#x5F55;&#xFF1A;<br></p>
<blockquote>
<p>a. &#x4FEE;&#x6539;AutotestWebD/sosotest-chrome-extension/panel.js&#x4E2D;&#x7684;serviceHost&#x4E3A;&#x4F60;&#x7684;&#x57DF;&#x540D;&#x3002;<br>
b. &#x5BF9;&#x76EE;&#x5F55;sosotest-chrome-extension&#x8FDB;&#x884C;zip&#x538B;&#x7F29;&#x540E;&#xFF0C;&#x5C06;&#x538B;&#x7F29;&#x6587;&#x4EF6;sosotest-chrome-extension.zip&#x653E;&#x5165;AutotestWebD/static/soso_extensions&#x76EE;&#x5F55;&#x3002;<br></p>
</blockquote>
<h1 id="11&#x3001;&#x6B63;&#x5F0F;&#x4F7F;&#x7528;">11&#x3001;&#x6B63;&#x5F0F;&#x4F7F;&#x7528;</h1>
<p>&#x53C2;&#x8003;&#x4F7F;&#x7528;&#x6587;&#x6863;</p>
<h1 id="12&#x3001;&#x5176;&#x4ED6;&#x6CE8;&#x610F;&#x4E8B;&#x9879;">12&#x3001;&#x5176;&#x4ED6;&#x6CE8;&#x610F;&#x4E8B;&#x9879;</h1>
<h2 id="&#x4E00;&#x4E9B;&#x5F02;&#x5E38;&#x7684;&#x89E3;&#x51B3;&#x65B9;&#x6848;&#xFF0C;&#x90FD;&#x662F;&#x7CFB;&#x7EDF;&#x914D;&#x7F6E;&#x95EE;&#x9898;&#x6216;&#x8005;&#x6570;&#x636E;&#x5E93;&#x914D;&#x7F6E;&#x95EE;&#x9898;">&#x4E00;&#x4E9B;&#x5F02;&#x5E38;&#x7684;&#x89E3;&#x51B3;&#x65B9;&#x6848;&#xFF0C;&#x90FD;&#x662F;&#x7CFB;&#x7EDF;&#x914D;&#x7F6E;&#x95EE;&#x9898;&#x6216;&#x8005;&#x6570;&#x636E;&#x5E93;&#x914D;&#x7F6E;&#x95EE;&#x9898;</h2>
<h3 id="linux&#x7CFB;&#x7EDF;&#x914D;&#x7F6E;timewait&#x95EE;&#x9898;&#xFF0C;&#x7531;&#x4E8E;&#x591A;&#x6B21;tcp&#x8BF7;&#x6C42;&#x53EF;&#x80FD;&#x5B58;&#x5728;timewait&#x8FC7;&#x591A;&#x95EE;&#x9898;&#x3002;">Linux&#x7CFB;&#x7EDF;&#x914D;&#x7F6E;TIME_WAIT&#x95EE;&#x9898;&#xFF0C;&#x7531;&#x4E8E;&#x591A;&#x6B21;tcp&#x8BF7;&#x6C42;&#x53EF;&#x80FD;&#x5B58;&#x5728;TIME_WAIT&#x8FC7;&#x591A;&#x95EE;&#x9898;&#x3002;</h3>
<p>&#x9700;&#x8981;&#x5BF9;&#x7CFB;&#x7EDF;&#x505A;&#x5982;&#x4E0B;&#x914D;&#x7F6E;&#xFF1A;<br>
(1) vim /etc/sysctl.conf<br>
&#x8F93;&#x5165;&#x5982;&#x4E0B;&#x5185;&#x5BB9;&#xFF1A;<br></p>
<pre><code class="lang-bash">net.ipv4.tcp_syncookies = 1
net.ipv4.tcp_tw_reuse = 1
net.ipv4.tcp_tw_recycle = 0
net.ipv4.tcp_fin_timeout = 5
net.ipv4.ip_<span class="hljs-built_in">local</span>_port_range = 1024 65535
</code></pre>
<p>(2)  &#x8BA9;&#x4FEE;&#x6539;&#x751F;&#x6548;&#x3002;&#x547D;&#x4EE4;&#xFF1A;</p>
<pre><code class="lang-bash">/sbin/sysctl -p
</code></pre>
<h3 id="&#x89E3;&#x51B3;&#x591A;&#x4EFB;&#x52A1;&#x5E76;&#x53D1;&#x7684;&#x8FDE;&#x63A5;&#x9519;&#x8BEF;&#x5F02;&#x5E38;">&#x89E3;&#x51B3;&#x591A;&#x4EFB;&#x52A1;&#x5E76;&#x53D1;&#x7684;&#x8FDE;&#x63A5;&#x9519;&#x8BEF;&#x5F02;&#x5E38;</h3>
<p>&#x53C2;&#x8003;&#x94FE;&#x63A5;&#xFF1A;<a href="https://blog.csdn.net/duan19056/article/details/51210110" target="_blank">https://blog.csdn.net/duan19056/article/details/51210110</a><br>
(1) vim /etc/security/limits.conf<br></p>
<pre><code class="lang-bash">mysql soft nofile 10240
mysql hard nofile 10240
</code></pre>
<p>(2) /etc/pam.d/login<br></p>
<pre><code class="lang-bash">session required /lib/security/pam_limits.so

<span class="hljs-built_in">echo</span> <span class="hljs-string">&quot;ulimit -HSn 10240&quot;</span> &gt;&gt; /etc/rc.local
<span class="hljs-built_in">echo</span> <span class="hljs-string">&quot;ulimit -HSn 10240&quot;</span> &gt;&gt; /root/.bash_profile
<span class="hljs-built_in">ulimit</span> -HSn 10240
<span class="hljs-built_in">ulimit</span> -n
</code></pre>
<p>(3) &#x6700;&#x540E; ulimit -a &#x67E5;&#x770B; open files 10240&#x5373;&#x53EF;<br></p>
<h3 id="errno-111-connection-refused-&#x9519;&#x8BEF;">[Errno 111] Connection refused &#x9519;&#x8BEF;</h3>
<p>&#x5C1D;&#x8BD5;&#x5982;&#x4E0B;&#x914D;&#x7F6E;&#xFF1A;<br>
400 bad request<br>
ALLOWED_HOSTS&#x6CA1;&#x6709;&#x52A0;host&#xFF0C;&#x5728;&#x914D;&#x7F6E;&#x6587;&#x4EF6;config.ini&#x7684;allowed_host&#x4E2D;&#x52A0;&#x5165;&#x5141;&#x8BB8;&#x8BF7;&#x6C42;&#x7684;&#x57DF;&#x540D;&#x6216;&#x8005;ip&#x3002;<br></p>
<h3 id="mysql&#x7684;&#x4E00;&#x4E9B;&#x914D;&#x7F6E;&#x95EE;&#x9898;">mysql&#x7684;&#x4E00;&#x4E9B;&#x914D;&#x7F6E;&#x95EE;&#x9898;</h3>
<p>&#x4FEE;&#x6539;my.cnf&#xFF0C;&#x518D;&#x5C31;&#x662F;&#x5173;&#x95ED;&#x6253;&#x5F00;&#x7684;mysql&#x8FDE;&#x63A5;&#x3002; &#x7F16;&#x8F91;/etc/my.cnf&#x6587;&#x4EF6;&#xFF0C;&#x52A0;&#x5165;&#x5982;&#x4E0B;&#x53C2;&#x6570;&#xFF0C;&#x91CD;&#x542F;mysql<br></p>
<pre><code class="lang-bash">[mysqld]
open_files_<span class="hljs-built_in">limit</span> = 65535
max_connections = 10000
sql_mode = <span class="hljs-string">&quot;STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION,NO_ZERO_DATE,NO_ZERO_IN_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER&quot;</span>
</code></pre>

                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="../" class="navigation navigation-prev " aria-label="Previous page: sosotest平台介绍">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="./" class="navigation navigation-next " aria-label="Next page: 使用配置入门">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"安装部署sosotest服务","level":"1.2","depth":1,"next":{"title":"使用配置入门","level":"1.3","depth":1,"path":"A0000_quickstart/README.md","ref":"A0000_quickstart/README.md","articles":[{"title":"管理员配置","level":"1.3.1","depth":2,"path":"A0000_quickstart/A01_system_config.md","ref":"A0000_quickstart/A01_system_config.md","articles":[]},{"title":"用户配置","level":"1.3.2","depth":2,"path":"A0000_quickstart/A02_user_config.md","ref":"A0000_quickstart/A02_user_config.md","articles":[]},{"title":"用例编写","level":"1.3.3","depth":2,"path":"A0000_quickstart/A03_interface.md","ref":"A0000_quickstart/A03_interface.md","articles":[]},{"title":"任务与任务集","level":"1.3.4","depth":2,"path":"A0000_quickstart/A04_task.md","ref":"A0000_quickstart/A04_task.md","articles":[]},{"title":"持续集成","level":"1.3.5","depth":2,"path":"A0000_quickstart/A05_cicd.md","ref":"A0000_quickstart/A05_cicd.md","articles":[]}]},"previous":{"title":"sosotest平台介绍","level":"1.1","depth":1,"path":"README.md","ref":"README.md","articles":[]},"dir":"ltr"},"config":{"plugins":["expandable-chapters","theme-comscore","splitter"],"styles":{"website":"styles/website.css","ebook":"styles/ebook.css","pdf":"styles/pdf.css","mobi":"styles/mobi.css","epub":"styles/epub.css"},"pluginsConfig":{"splitter":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"fontsettings":{"theme":"white","family":"sans","size":2},"highlight":{},"theme-comscore":{},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"expandable-chapters":{}},"theme":"default","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"sosotest","gitbook":"*","theme-default":{"showLevel":true}},"file":{"path":"A0000_quickstart/A00_install.md","mtime":"2019-06-17T09:17:09.023Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2019-06-19T14:58:27.203Z"},"basePath":"..","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="../gitbook/gitbook.js"></script>
    <script src="../gitbook/theme.js"></script>
    
        
        <script src="../gitbook/gitbook-plugin-expandable-chapters/expandable-chapters.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-splitter/splitter.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search/search-engine.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search/search.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-sharing/buttons.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-theme-comscore/test.js"></script>
        
    

    </body>
</html>

